#version 460

layout(location=0) in vec4 vColor;
layout(location=2) in float DepthScale;
layout(location=3) in float Transparency;



layout(location=0) out vec4 outColor;


void main(void){
	//outColor = vColor;
	outColor = vColor;
	//outColor.a = min(1.0, (1.0 - gl_FragCoord.z) * 10000);
	outColor.a = min(outColor.a, (1.0 - gl_FragCoord.z) * 200000) * Transparency;

	//gl_FragDepth = (1-gl_FragDepth) * DepthScale;
	gl_FragDepth = gl_FragCoord.z * DepthScale;
}



